package com.yunxin.core.application.command.product;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author zero°
 * @since 2023-12-16
 */
@Data
public class AddProductAdvanceChargeRecordCommand {

    /**
     * 预付款日期 yyyy-mm-dd
     */
    @NotBlank(message = "预付款日期不能为空")
    @Schema(description = "预付款日期 yyyy-mm-dd")
    private String advanceChargeDate;

    /**
     * 产品id
     */
    @NotNull(message = "产品id不能为空")
    @Schema(description = "产品id")
    private Long productId;

    /**
     * 商户id
     */
    @NotNull(message = "商户id不能为空")
    @Schema(description = "商户id")
    private Long merchantId;

    /**
     * 结算类型 1.UV 2.注册 3.表单
     */
    @NotNull(message = "结算类型不能为空")
    @Min(value = 1, message = "结算类型不能小于1")
    @Max(value = 3, message = "结算类型不能大于3")
    @Schema(description = "结算类型 1.UV 2.注册 3.表单")
    private Integer settlementType;

    /**
     * 结算单价
     */
    @NotNull(message = "结算单价不能为空")
    @Schema(description = "结算单价")
    private BigDecimal settlementUnitPrice;

    /**
     * 结算数量
     */
    @NotNull(message = "结算数量不能为空")
    @Schema(description = "结算数量")
    private Integer settlementNumber;

    /**
     * 预付款金额
     */
    @NotNull(message = "预付款金额不能为空")
    @Schema(description = "预付款金额")
    private BigDecimal advanceChargeAmount;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
    /**
     * 创建人
     */
    @Schema(hidden = true)
    private String creator;
}
